<?php
/* @var $this ContainerController */
/* @var $model Container */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'container-form',
	'enableClientValidation'=>true,
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	
	<br>
		<div class="row">
		<?php echo $form->error($model,'code'); ?>
	</div>
		<?php echo $form->labelEx($model,'code'); ?>	
		<?php //echo $form->textField($model,'code',array('size'=>45,'maxlength'=>45));
$this->widget(
    'booster.widgets.TbSelect2',
    array(
        'asDropDownList' => false,
        'name' => 'Container[code]',
        'options' => array(
            'tags' => array('	'),
            'placeholder' => 'Enter Container Numbers',
            'width' => '40%',
            'tokenSeparators' => array(',', ' ')
        )
    )
);


		?>

	</div>
	
	
	<div class="row">
	<?php //echo $form->labelEx($model,'entry_id'); ?>
	 <?php echo $form->hiddenField($model,'entry_id'); ?>

	
		
		<?php //echo $form->dropDownList($model, 'entry_id', CHtml::listData(Entry::model()->findAll(), 'id', 'code'), array('prompt' => 'Select Entry Code')); ?>
	
	</div>
	
	
		<?php /*
	<h2> Items </h2>
	
	
	<?php echo $form->hiddenField($item2,'container_id'); ?>
	
	<div class="row">
		<?php echo $form->labelEx($item2,'description'); ?>
		<?php echo $form->textField($item2,'description',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($item2,'description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($item2,'quantity'); ?>
		<?php echo $form->textField($item2,'quantity'); ?>
		<?php echo $form->error($item2,'quantity'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($item2,'cost'); ?>
		<?php echo $form->textField($item2,'cost',array('size'=>16,'maxlength'=>16)); ?>
		<?php echo $form->error($item2,'cost'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($item2,'tariff_heading'); ?>
		<?php echo $form->textField($item2,'tariff_heading',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($item2,'tariff_heading'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($item2,'tariff_rate'); ?>
		<?php echo $form->textField($item2,'tariff_rate',array('size'=>21,'maxlength'=>21)); ?>
		<?php echo $form->error($item2,'tariff_rate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($item2,'gross_weight'); ?>
		<?php echo $form->textField($item2,'gross_weight',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($item2,'gross_weight'); ?>
	</div>
*/ ?>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Add' : 'Save'); ?>
	</div> 

<?php $this->endWidget(); ?>

</div><!-- form -->